Skip to content

Conversation

@BCSharp
Copy link
Member

@BCSharp BCSharp commented Jan 28, 2025

This is a mock implementation of fcntl.ioctl, supporting only one command: termios.TIOCGWINSZ (i.e. Terminal I/O Control Get WINdow SiZe). It doesn't do any syscalls but provides the result using equivalent .NET functions. It ignores the file descriptor, and always returns the size of the console, so is not appropiate for pseudo-terminals (pty, tty). Nevertheless, it is still useful as some packages depend on this call to get the console window size (prompt_toolkit.terminal.vt100_input).

Copy link
Contributor

@slozier slozier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me. Thanks!

@BCSharp BCSharp merged commit e06b18a into IronLanguages:main Jan 28, 2025
8 checks passed
@BCSharp BCSharp deleted the fcntl_ioctl_mock branch January 28, 2025 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants